<%@ page import="cn.com.test.common.dto.UserDTO" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: chenwb
  Date: 2019/12/18
  Time: 15:34
  To change this template use File | Settings | File Templates.
--%>
<!--配置了isELIgnored="true"，该页面的EL表达式就失效了-->
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <style>
        table {
            border-collapse: collapse;
        }

        table, td, th {
            border: 1px solid black;
        }

        td {
            text-align: center;
        }

        td {
            height: 20px;
            vertical-align: bottom;
        }
    </style>
    <title>查询用户信息</title>
</head>
<body>
<%
    List<UserDTO> users = (List<UserDTO>) request.getAttribute("users");
%>
<div>
    <table width="600px" style="border: 1px solid">
        <tr>
            <td>ID</td>
            <td>用户名</td>
            <td>注册时间</td>
        </tr>
        <%for (UserDTO userDTO : users) {%>
        <tr>
            <td><%=userDTO.getId()%>
            </td>
            <td><%=userDTO.getUserName()%>
            </td>
            <td><%=userDTO.getRegisterTime()%>
            </td>
        </tr>
        <%}%>
    </table>
    <div><%=(String) request.getAttribute("pageBar")%>
    </div>
    <div>${pageBar}</div>
    <%
        String[] arr = {"index1", "index2", "index3"};
        for (int i = 0; i < 3; i++) {%>
    <tr>
        <td><%=arr[i]%>
        </td>
    </tr>
    <%}%>
    <div>${param.pageNum}</div>
</div>
</body>
</html>
